package top.dotgo.web.admin.oauth.bean;

import lombok.Getter;
import lombok.Setter;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.ArrayList;
import java.util.Collection;

/**
 * @author jornl
 * @date 2020/2/23 21:27 星期日
 */
@Getter
@Setter
public class UserDetailBean implements UserDetails {
    private String username;
    private String password;
    private String id;

    /**
     * 角色 列表
     *
     * @return Collection
     */

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return new ArrayList<>();
    }


    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }
}
